/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: RxDataScanner
 * @Package com.rx.core.data
 * @Description: RxData 注解扫描
 * @author: 陈锦韬
 * @date: 2020\8\11 0011
 * @version V1.0
 * @Copyright: 2020 陈锦韬  All rights reserved.
 */
package com.rx.core.data;

import com.rx.core.base.RxScanner;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.core.type.filter.AssignableTypeFilter;
import org.springframework.core.type.filter.TypeFilter;

/**
 * @author: Administrator
 * @Description: RxData 注解扫描
 * @date: 2020\8\11 0011
 */
@Slf4j
public class RxDataScanner extends RxScanner {

    public RxDataScanner(BeanDefinitionRegistry registry) {
        super(registry);
    }

    public static void scan(BeanDefinitionRegistry registry,String[] basePackages){
        RxDataScanner scanner = new RxDataScanner(registry);
        TypeFilter helloServiceFilter = new AssignableTypeFilter(RxData.class);
        scanner.addIncludeFilter(helloServiceFilter);
        // 第二个参数是注解
        scanner.scanRxData(basePackages,RxData.class);
        scanner.scan(basePackages);
    }
}
